var Mock = require('mockjs');



exports.response = function (req, res) {

  return Mock.mock({
    "msg": "OK",
    "code": 0,
    "data|150": 
      [{
        "name":"@cname()",
        "username":'@first()@cname()@last()',
        "email":'@email',
        "phone":/^1[34578]\d{9}$/,
        "createDate": "@date(yyyy/MM/dd HH:mm)",
        "pdt|10":[{
          "pdtname":'@cname()+@last()',
          "pdtid|+1":1,
          'roleId|1': [1, 2],
          'operationpower': function() {
            return ["readonly","writeonly"][this.roleId - 1]
          },
        }],
      }],
      "page":{
      "pagesize":15,
      "currentpage":1,
      "totalpage":10,
      "totalnum":150
    }
      
  })
}